<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('First_cate')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-first_cate" data-rule="required" data-source="category/selectpage"
                data-params='{"custom[type]":"goods","custom[pid]":0}' class="form-control selectpage" name="row[first_cate]"
                type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" data-rule="required" data-source="category/selectpage"
                data-params='{"custom[type]":"goods","custom[pid]":["gt",0]}' class="form-control selectpage" name="row[category_id]"
                type="text" value="">
        </div>
    </div>
<!-- 
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('授权平台')}:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table fieldlist" data-name="row[acct_json]" data-template="row[acct_json]tpl">
                <tr>
                    <td>{:__('平台')}</td>
                    <td>{:__('售价')}</td>
                    <td>{:__('进货价')}</td>
                    <td width="90">{:__('Operate')}</td>
                </tr>
                <tr>
                    <td colspan="3">
                        <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i>
                            {:__('Append')}</a>
                        <textarea name="row[acct_json]" class="form-control hide" cols="30"
                            rows="5"></textarea>
                    </td>
                </tr>
            </table>
            <script type="text/html" id="row[acct_json]tpl">
                <tr>
                    <td><input type="text" name="<%=name%>[<%=index%>][acct_id]" class="form-control selectpage" data-source="auth/admin/selectgroup" data-field="nickname" value="<%=row.acct_id%>" placeholder="平台"/></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][price]" class="form-control " value="<%=row.price%>" placeholder="售价"/></td>
                    <td><input type="text" name="<%=name%>[<%=index%>][purchase_price]" class="form-control " value="<%=row.purchase_price%>" placeholder="进货价"/></td>
                    <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Thumb_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-thumb_image" class="form-control" size="50" name="row[thumb_image]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-thumb_image" class="btn btn-danger faupload"
                            data-input-id="c-thumb_image"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="false" data-preview-id="p-thumb_image"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-thumb_image" class="btn btn-primary fachoose"
                            data-input-id="c-thumb_image" data-mimetype="image/*" data-multiple="false"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-thumb_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-thumb_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('视频')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-file" class="form-control" size="50" name="row[file]" type="text"
                    value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-file" class="btn btn-danger faupload"
                            data-input-id="c-file" data-multiple="false" data-preview-id="p-file"><i
                                class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-file" class="btn btn-primary fachoose"
                            data-input-id="c-file" data-multiple="false"><i class="fa fa-list"></i>
                            {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-file"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-file"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('检验报告')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-check_image" class="form-control" size="50" name="row[check_image]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-check_image" class="btn btn-danger faupload"
                            data-input-id="c-check_image"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="false" data-preview-id="p-check_image"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-check_image" class="btn btn-primary fachoose"
                            data-input-id="c-check_image" data-mimetype="image/*" data-multiple="false"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-check_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-check_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload"
                            data-input-id="c-images"
                            data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp"
                            data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i>
                            {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose"
                            data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i
                                class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否爆款')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-recommend" data-rule="required" class="form-control selectpicker"
                name="row[recommend]">
             
                <option value="0">否</option>
                <option value="1">是</option>
                
       
            </select>

        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('标签')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tags" class="form-control" data-role="tagsinput" name="row[tags]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sale_switch')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-sale_switch" data-rule="required" min="0" class="form-control selectpicker"
                name="row[sale_switch]">
                {foreach name="saleSwitchList" item="vo"}
                <option value="{$key}" {in name="key" value="1" }selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('进货价')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-purchase_price" min="0" class="form-control" step="0.01" name="row[purchase_price]"
                type="number" value="0.00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" min="0" class="form-control" step="0.01" name="row[price]" type="number" value="0.00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('限购')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-limited" min="0" class="form-control" step="0.01" name="row[limited]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Stock')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-stock" min="0" class="form-control" step="0.01" name="row[stock]" type="number" value="0.00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sale_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sale_num" min="0" class="form-control" step="0.01" name="row[sale_num]" type="number"
                value="0.00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('重量（斤）')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weight" class="form-control" name="row[weight]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Unit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-unit" class="form-control" name="row[unit]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Intro')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-intro" class="form-control" name="row[intro]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('产品味型')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-taste_pattern" class="form-control" name="row[taste_pattern]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('麻辣指数')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-spicy_index" class="form-control" name="row[spicy_index]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('对标品牌')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-brand" class="form-control" name="row[brand]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('适用区域')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-area" class="form-control" name="row[area]" type="text" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('仅直推收益')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-only_fx" data-rule="required" class="form-control selectpicker"
                name="row[only_fx]">
             
                <option value="0">否</option>
                <option value="1">是</option>
                
       
            </select>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('直推收益%')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fx_rate" class="form-control" name="row[fx_rate]" type="text" value="0">
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('定制商品')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                <label for="row[custom]-0"><input id="row[custom]-0" name="row[custom]" type="radio" value="0" {in
                        name="key" value="0" }checked{/in} /> 否</label>
                <label for="row[custom]-1"><input id="row[custom]-1" name="row[custom]" type="radio" value="1" {in
                        name="key" value="1" }checked{/in} /> 是</label>
            </div>
        </div>
    </div>

    <div class="form-group" data-favisible="custom=1">
        <label class="control-label col-xs-12 col-sm-2">{:__('关联用户')}:</label>
        <div class="col-xs-12 col-sm-8">

            <table class="table fieldlist" data-name="row[user_json]" data-template="row[user_json]tpl">
                <tr>
                    <td>{:__('用户')}</td>
                    <td width="90">{:__('Operate')}</td>
                </tr>
                <tr>
                    <td colspan="3">
                        <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i>
                            {:__('Append')}</a>
                        <textarea name="row[user_json]" class="form-control hide" cols="30"
                            rows="5"></textarea>
                    </td>
                </tr>
            </table>
            <script type="text/html" id="row[user_json]tpl">
                <tr>
                    <td><input type="text" name="<%=name%>[<%=index%>][user_id]" class="form-control selectpage" data-source="user/user/index" data-field="mobile" value="<%=row.user_id%>" placeholder="用户"/></td>
                    <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-custom" class="form-control" name="row[custom]" type="hidden" value="0">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>